local skel = fk.CreateSkill{
  name = "tea__xiuren",
  tags = { Skill.Switch }
}
--local U = require "packages/utility/utility"
Fk:loadTranslationTable{
  ["tea__xiuren"] = "修仁",
  [":tea__xiuren"] = "转换技，当一名角色回复体力后，①你可以令其摸两张牌；②其可以令你摸两张牌。",
  ["#tea__xiuren-yang"] = "修仁：你可以令 %src 摸两张牌",
  ["#tea__xiuren-yin"] = "修仁：你可以令 %src 摸两张牌",
}
---@type TrigSkelSpec<RecoverTrigFunc>
local xiuren = {
  mute = true,
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(skel.name) and data.num > 0
  end,
  on_cost = function (self, event, target, player, data)
    if player:getSwitchSkillState(skel.name, false) == fk.SwitchYang then
      return player.room:askToSkillInvoke(player, {
        skill_name = skel.name,
        prompt = "#tea__xiuren-yang:" .. target.id
      })
    else
      return player.room:askToSkillInvoke(target, {
        skill_name = skel.name,
        prompt = "#tea__xiuren-yin:" .. player.id
      })
    end
  end,
  on_use = function (self, event, target, player, data)
    player.room:notifySkillInvoked(player, skel.name, "special") 
    if player:getSwitchSkillState(skel.name, true) == fk.SwitchYang then
      player:broadcastSkillInvoke(skel.name, 1)
      player.room:doIndicate(player, {target})
      target:drawCards(2, skel.name)
    else
      player:broadcastSkillInvoke(skel.name, 2)
      player.room:doIndicate(target, {player})
      player:drawCards(2, skel.name)
    end
  end
}
skel:addEffect(fk.HpRecover, xiuren)
-- Fk.generals["mouxusheng"]:addSkill(skel.name)
return skel